Repository navigation
ci: replace the add-to-project PAT with a GitHub App token (#376) - #377
Open
Nicolas Carenton (ncarenton) wants to merge 1 commit into
Open
Nicolas Carenton (ncarenton) wants to merge 1 commit into
Nicolas Carenton (ncarenton) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The migration requires live post-merge validation of the GitHub App’s credentials and organization-project write access for both issues and pull requests before removing the PAT secret.
No open issues 🎉
What changed in this PR
Replaces the add-to-project workflow’s personal access token with a short-lived GitHub App installation token, addressing #376.
Changes:
- Generates an App token scoped to organization projects write access.
- Pins both actions to commit SHAs and disables
GITHUB_TOKENpermissions. - Requires post-merge verification before deleting the old PAT secret.
| File | Description |
|---|---|
.github/workflows/integrations-add-to-project.yml |
Generates and uses the App token, pins actions, and sets permissions: {}. |
Review effort: Balanced
GITHUB_TOKEN cannot write to an organization project. Instead of a personal access token, create a short-lived GitHub App installation token, limited to organization projects. Read the project URL from the shared XTM_INTEGRATIONS_PROJECT_URL organization variable instead of the per-repository PROJECT_URL. Pin add-to-project to a commit SHA and drop the default GITHUB_TOKEN permissions, which the job does not use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nicolas Carenton (ncarenton)
force-pushed
the
ci/add-to-project-github-app
branch
from
November 6, 2026 11:16
715adc0 to
1ba12a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
ADD_TO_PROJECT_PATpersonal access token with a short-lived GitHub App installation token, created byactions/create-github-app-tokenand limited to organization projects (permission-organization-projects: write).XTM_INTEGRATIONS_PROJECT_URLorganization variable instead of the per-repositoryPROJECT_URLvariable.actions/add-to-projectto a commit SHA and setpermissions: {}: the job does not useGITHUB_TOKEN.Testing Instructions
ADD_TO_PROJECT_APP_IDvariable and theADD_TO_PROJECT_APP_PRIVATE_KEYsecret are already set on this repository.issuesandpull_request_targetrun the workflow from the default branch, so this PR cannot test itself: after the merge, open a test issue and check that the workflow succeeds and the issue lands on the project.ADD_TO_PROJECT_PATsecret and thePROJECT_URLvariable.Related issues
Checklist
Further comments
🤖 Generated with Claude Code